#include<stdio.h>
#include<assert.h>

char* my_strncat(char* dest, const char* src, size_t num)
{
	assert(dest && src);
	char* ret = dest;
	while (*dest)
	{
		dest++;
	}
	while (num && *src)
	{
		*dest++ = *src++;
		num--;
	}
	*dest = '\0';
	return ret;
}

int main()
{

	char arr1[20] = "Hello";
	char arr2[20] = "WIFF";
	printf("%s", my_strncat(arr1, arr2, 12));
	return 0;
}